package com.example.gkcircle.utils;

import android.text.Editable;
import android.text.TextWatcher;
import android.widget.EditText;
import android.widget.TextView;

import java.util.regex.Matcher;
import java.util.regex.Pattern;

/**
 * Created by Jehu on 16/3/20.
 */
public class StringUtil {


    public static boolean isMobile(String mobiles) {
        Pattern p = Pattern.compile("^((13[0-9])|(15[^4,\\D])|(18[0-9]))\\d{8}$");
        Matcher m = p.matcher(mobiles);
        return m.matches();
    }

    //过滤出路径下图片的名字
    public static String filterPhotoName(String path){
        int index=path.lastIndexOf("/");
        return path.substring(index + 1);
    }
}
